{% assign defaultSrc = 'empty.png' | public_asset_abs_url %}
{% assign defaultLoadSrc = 'empty_loading.png' | public_asset_abs_url %}

{% if code and code != "" %}
    <img data-sizes="{{sizes | 'auto'}}" {{attr}} class="{{class}}" data-src="`/statics/country/flag/{{ code }}.png`" alt="{{alt}}" src="{{defaultLoadSrc }}" data-cdn="true" style="width: {{ width | default: '30px' }};height: {{ height | default: 'auto' }};object-fit: contain;" />
  {% else %}
    <img class="{{class}}" src="{{ defaultSrc }}" style="width: {{ width | default: '30px' }};height: {{ height | default: 'auto' }};object-fit: contain;" />
  {% endif %}

  <script>
    console.log('/statics/country/flag/{{ code }}.png')
</script>